package cn.edu.scau.cmi.liuan.factoryMode;

import cn.edu.scau.cmi.liuan.factoryMode.*;

public class Factory {
	public Insurance GetInsurance(int type) {
		switch(type) {
			case 0:
				return new BodyInjured();
			case 1:
				return new CarDestoryed();
			case 2:
				return new PersonCasualties();
			case 3:
				return new MultipleAccidents();
			default:
				return null;
		}
	}
}
